Integrand size = 21, antiderivative size = 83 \[ \int \left (a+b \sec ^2(e+f x)\right ) \sin ^7(e+f x) \, dx=-\frac {(a-3 b) \cos (e+f x)}{f}+\frac {(a-b) \cos ^3(e+f x)}{f}-\frac {(3 a-b) \cos ^5(e+f x)}{5 f}+\frac {a \cos ^7(e+f x)}{7 f}+\frac {b \sec (e+f x)}{f} \]
-(a-3*b)*cos(f*x+e)/f+(a-b)*cos(f*x+e)^3/f-1/5*(3*a-b)*cos(f*x+e)^5/f+1/7* a*cos(f*x+e)^7/f+b*sec(f*x+e)/f
Time = 0.40 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.45 \[ \int \left (a+b \sec ^2(e+f x)\right ) \sin ^7(e+f x) \, dx=-\frac {35 a \cos (e+f x)}{64 f}+\frac {19 b \cos (e+f x)}{8 f}+\frac {7 a \cos (3 (e+f x))}{64 f}-\frac {3 b \cos (3 (e+f x))}{16 f}-\frac {7 a \cos (5 (e+f x))}{320 f}+\frac {b \cos (5 (e+f x))}{80 f}+\frac {a \cos (7 (e+f x))}{448 f}+\frac {b \sec (e+f x)}{f} \]
(-35*a*Cos[e + f*x])/(64*f) + (19*b*Cos[e + f*x])/(8*f) + (7*a*Cos[3*(e + f*x)])/(64*f) - (3*b*Cos[3*(e + f*x)])/(16*f) - (7*a*Cos[5*(e + f*x)])/(32 0*f) + (b*Cos[5*(e + f*x)])/(80*f) + (a*Cos[7*(e + f*x)])/(448*f) + (b*Sec [e + f*x])/f
Time = 0.24 (sec) , antiderivative size = 74, normalized size of antiderivative = 0.89, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3042, 4621, 355, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sin ^7(e+f x) \left (a+b \sec ^2(e+f x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sin (e+f x)^7 \left (a+b \sec (e+f x)^2\right )dx\) |
\(\Big \downarrow \) 4621 |
\(\displaystyle -\frac {\int \left (1-\cos ^2(e+f x)\right )^3 \left (a \cos ^2(e+f x)+b\right ) \sec ^2(e+f x)d\cos (e+f x)}{f}\) |
\(\Big \downarrow \) 355 |
\(\displaystyle -\frac {\int \left (-a \cos ^6(e+f x)+(3 a-b) \cos ^4(e+f x)-3 (a-b) \cos ^2(e+f x)+b \sec ^2(e+f x)+a \left (1-\frac {3 b}{a}\right )\right )d\cos (e+f x)}{f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {\frac {1}{5} (3 a-b) \cos ^5(e+f x)-(a-b) \cos ^3(e+f x)+(a-3 b) \cos (e+f x)-\frac {1}{7} a \cos ^7(e+f x)-b \sec (e+f x)}{f}\) |
-(((a - 3*b)*Cos[e + f*x] - (a - b)*Cos[e + f*x]^3 + ((3*a - b)*Cos[e + f* x]^5)/5 - (a*Cos[e + f*x]^7)/7 - b*Sec[e + f*x])/f)
3.1.1.3.1 Defintions of rubi rules used
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q _.), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(a + b*x^2)^p*(c + d*x^2)^q, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b*c - a*d, 0] && IGtQ[p, 0] & & IGtQ[q, 0]
Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_ )]^(m_.), x_Symbol] :> With[{ff = FreeFactors[Cos[e + f*x], x]}, Simp[-ff/f Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*((b + a*(ff*x)^n)^p/(ff*x)^(n*p)), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/ 2] && IntegerQ[n] && IntegerQ[p]
Time = 4.14 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.18
method | result | size |
parallelrisch | \(\frac {\left (-980 a +4900 b \right ) \cos \left (2 f x +2 e \right )+\left (196 a -392 b \right ) \cos \left (4 f x +4 e \right )+\left (-44 a +28 b \right ) \cos \left (6 f x +6 e \right )+5 a \cos \left (8 f x +8 e \right )+\left (-2048 a +14336 b \right ) \cos \left (f x +e \right )-1225 a +9800 b}{4480 f \cos \left (f x +e \right )}\) | \(98\) |
derivativedivides | \(\frac {-\frac {a \left (\frac {16}{5}+\sin \left (f x +e \right )^{6}+\frac {6 \sin \left (f x +e \right )^{4}}{5}+\frac {8 \sin \left (f x +e \right )^{2}}{5}\right ) \cos \left (f x +e \right )}{7}+b \left (\frac {\sin \left (f x +e \right )^{8}}{\cos \left (f x +e \right )}+\left (\frac {16}{5}+\sin \left (f x +e \right )^{6}+\frac {6 \sin \left (f x +e \right )^{4}}{5}+\frac {8 \sin \left (f x +e \right )^{2}}{5}\right ) \cos \left (f x +e \right )\right )}{f}\) | \(102\) |
default | \(\frac {-\frac {a \left (\frac {16}{5}+\sin \left (f x +e \right )^{6}+\frac {6 \sin \left (f x +e \right )^{4}}{5}+\frac {8 \sin \left (f x +e \right )^{2}}{5}\right ) \cos \left (f x +e \right )}{7}+b \left (\frac {\sin \left (f x +e \right )^{8}}{\cos \left (f x +e \right )}+\left (\frac {16}{5}+\sin \left (f x +e \right )^{6}+\frac {6 \sin \left (f x +e \right )^{4}}{5}+\frac {8 \sin \left (f x +e \right )^{2}}{5}\right ) \cos \left (f x +e \right )\right )}{f}\) | \(102\) |
parts | \(-\frac {a \left (\frac {16}{5}+\sin \left (f x +e \right )^{6}+\frac {6 \sin \left (f x +e \right )^{4}}{5}+\frac {8 \sin \left (f x +e \right )^{2}}{5}\right ) \cos \left (f x +e \right )}{7 f}+\frac {b \left (\frac {\sin \left (f x +e \right )^{8}}{\cos \left (f x +e \right )}+\left (\frac {16}{5}+\sin \left (f x +e \right )^{6}+\frac {6 \sin \left (f x +e \right )^{4}}{5}+\frac {8 \sin \left (f x +e \right )^{2}}{5}\right ) \cos \left (f x +e \right )\right )}{f}\) | \(104\) |
norman | \(\frac {\frac {32 a -224 b}{35 f}-\frac {32 \left (a +b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{8}}{f}+\frac {6 \left (32 a -224 b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{35 f}+\frac {2 \left (32 a -224 b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{5 f}+\frac {2 \left (32 a -224 b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{6}}{5 f}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1\right ) \left (1+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}\right )^{7}}\) | \(133\) |
risch | \(\frac {19 \,{\mathrm e}^{i \left (f x +e \right )} b}{16 f}-\frac {35 \,{\mathrm e}^{i \left (f x +e \right )} a}{128 f}+\frac {19 \,{\mathrm e}^{-i \left (f x +e \right )} b}{16 f}-\frac {35 \,{\mathrm e}^{-i \left (f x +e \right )} a}{128 f}+\frac {2 b \,{\mathrm e}^{i \left (f x +e \right )}}{f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}+\frac {a \cos \left (7 f x +7 e \right )}{448 f}-\frac {7 \cos \left (5 f x +5 e \right ) a}{320 f}+\frac {\cos \left (5 f x +5 e \right ) b}{80 f}+\frac {7 \cos \left (3 f x +3 e \right ) a}{64 f}-\frac {3 \cos \left (3 f x +3 e \right ) b}{16 f}\) | \(165\) |
1/4480*((-980*a+4900*b)*cos(2*f*x+2*e)+(196*a-392*b)*cos(4*f*x+4*e)+(-44*a +28*b)*cos(6*f*x+6*e)+5*a*cos(8*f*x+8*e)+(-2048*a+14336*b)*cos(f*x+e)-1225 *a+9800*b)/f/cos(f*x+e)
Time = 0.25 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.90 \[ \int \left (a+b \sec ^2(e+f x)\right ) \sin ^7(e+f x) \, dx=\frac {5 \, a \cos \left (f x + e\right )^{8} - 7 \, {\left (3 \, a - b\right )} \cos \left (f x + e\right )^{6} + 35 \, {\left (a - b\right )} \cos \left (f x + e\right )^{4} - 35 \, {\left (a - 3 \, b\right )} \cos \left (f x + e\right )^{2} + 35 \, b}{35 \, f \cos \left (f x + e\right )} \]
1/35*(5*a*cos(f*x + e)^8 - 7*(3*a - b)*cos(f*x + e)^6 + 35*(a - b)*cos(f*x + e)^4 - 35*(a - 3*b)*cos(f*x + e)^2 + 35*b)/(f*cos(f*x + e))
Timed out. \[ \int \left (a+b \sec ^2(e+f x)\right ) \sin ^7(e+f x) \, dx=\text {Timed out} \]
Time = 0.19 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.88 \[ \int \left (a+b \sec ^2(e+f x)\right ) \sin ^7(e+f x) \, dx=\frac {5 \, a \cos \left (f x + e\right )^{7} - 7 \, {\left (3 \, a - b\right )} \cos \left (f x + e\right )^{5} + 35 \, {\left (a - b\right )} \cos \left (f x + e\right )^{3} - 35 \, {\left (a - 3 \, b\right )} \cos \left (f x + e\right ) + \frac {35 \, b}{\cos \left (f x + e\right )}}{35 \, f} \]
1/35*(5*a*cos(f*x + e)^7 - 7*(3*a - b)*cos(f*x + e)^5 + 35*(a - b)*cos(f*x + e)^3 - 35*(a - 3*b)*cos(f*x + e) + 35*b/cos(f*x + e))/f
Leaf count of result is larger than twice the leaf count of optimal. 266 vs. \(2 (79) = 158\).
Time = 0.32 (sec) , antiderivative size = 266, normalized size of antiderivative = 3.20 \[ \int \left (a+b \sec ^2(e+f x)\right ) \sin ^7(e+f x) \, dx=\frac {2 \, {\left (\frac {35 \, b}{\frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 1} + \frac {16 \, a - 77 \, b - \frac {112 \, a {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {504 \, b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {336 \, a {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac {1337 \, b {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac {560 \, a {\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {1680 \, b {\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} - \frac {1015 \, b {\left (\cos \left (f x + e\right ) - 1\right )}^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} + \frac {280 \, b {\left (\cos \left (f x + e\right ) - 1\right )}^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}} - \frac {35 \, b {\left (\cos \left (f x + e\right ) - 1\right )}^{6}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{6}}}{{\left (\frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} - 1\right )}^{7}}\right )}}{35 \, f} \]
2/35*(35*b/((cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 1) + (16*a - 77*b - 11 2*a*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 504*b*(cos(f*x + e) - 1)/(cos( f*x + e) + 1) + 336*a*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 - 1337*b*( cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 - 560*a*(cos(f*x + e) - 1)^3/(cos (f*x + e) + 1)^3 + 1680*b*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 - 1015 *b*(cos(f*x + e) - 1)^4/(cos(f*x + e) + 1)^4 + 280*b*(cos(f*x + e) - 1)^5/ (cos(f*x + e) + 1)^5 - 35*b*(cos(f*x + e) - 1)^6/(cos(f*x + e) + 1)^6)/((c os(f*x + e) - 1)/(cos(f*x + e) + 1) - 1)^7)/f
Time = 0.09 (sec) , antiderivative size = 70, normalized size of antiderivative = 0.84 \[ \int \left (a+b \sec ^2(e+f x)\right ) \sin ^7(e+f x) \, dx=\frac {\frac {a\,{\cos \left (e+f\,x\right )}^7}{7}-\cos \left (e+f\,x\right )\,\left (a-3\,b\right )-{\cos \left (e+f\,x\right )}^5\,\left (\frac {3\,a}{5}-\frac {b}{5}\right )+\frac {b}{\cos \left (e+f\,x\right )}+{\cos \left (e+f\,x\right )}^3\,\left (a-b\right )}{f} \]